package com.power.sifa.correction.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.correction.model.Cre_work;
import com.power.sifa.correction.model.pageInfo.Cre_workPageInfo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 预警处置任务 Feign
 */
public interface ICre_workFeign {

    /**
     * 预警处置任务分页列表
     */
    @PostMapping("/cre_work/list")
    ResponseDTO list(@RequestBody Cre_workPageInfo cre_workPageInfo);

    /**
     * 查看预警处置任务
     */
    @GetMapping("/cre_work/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
     * 删除预警处置任务
     */
    @PostMapping("/cre_work/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看预警处置任务 复合主键使用
    // */
    //@PostMapping("/cre_work/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Cre_work.Cre_workPK pk);

    /**
     * 修改或保存预警处置任务
     */
    @PostMapping("/cre_work/save")
    ResponseDTO save(@RequestBody Cre_work cre_work);

    ///**
    // * 删除预警处置任务 复合主键使用
    // */
    //@PostMapping("/cre_work/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Cre_work.Cre_workPK pk);

    /**
     * 批量删除预警处置任务
     */
    @PostMapping("/cre_work/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

    /**
     * 导出excel
     */
    @PostMapping("/cre_work/output")
    void output(HttpServletResponse response, @RequestBody Cre_workPageInfo cre_workPageInfo);

    /**
     * 导出excel模板
     */
    @PostMapping("/cre_work/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

    /**
     * 导入excel
     */
    @PostMapping("/cre_work/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException;

    /**
     * 查询预警处置任务关联查询预警信息数据
     *
     * @param pageInfo
     * @return
     */
    @PostMapping("/cre_work/queryList")
    ResponseDTO queryList(@RequestBody Cre_workPageInfo pageInfo);

    /**
     * 更新预警处置任务状态
     *
     * @param workid
     * @param warnid
     * @param worktype
     */
    @PostMapping("/cre_work/updateWorktype")
    ResponseDTO updateWorktype(String workid, String warnid, Integer worktype);

    /**
     * 预警任务处置完成
     *
     * @param id
     * @return
     */
    @PostMapping("/cre_work/complete")
    ResponseDTO complete(String id);

    /**
     * 预警处置情况
     *
     * @return
     */
    @PostMapping("/cre_work/getDisposalStatus")
    ResponseDTO getDisposalStatus(@RequestBody List<String> f_deptid);

    /**
     * 查看处置流程
     *
     * @param warnId
     * @return
     */
    @GetMapping("/cre_work/findProcess")
    ResponseDTO findProcess(String warnId);

}
